///////////////////////////////////////
///// MAKE TABLE A8 ///////////////////
///////////////////////////////////////


use "Enfranchisement and Representation 1919.dta", clear


gen Denf_19_09=100*(reg19-reg09)/reg19
gen Denf1=100*(reg13-reg09)/reg19
gen Denf2=100*(reg19-reg13)/reg19


gen estrema19=(soc19_pct+rif19_pct+rep19_pct+rad19_pct)

gen estrema09=(soc09_pct+rep09_pct+rad09_pct)

gen Destrema19_09=estrema19-estrema09


gen DestremaMP19_09=estremaMP19-estremaMP09



gen op21p=100*op21/pop21
gen op11p=100*op11/pop11
gen Dop=op21p-op11p
gen Dpop21=pop21-pop11

gen density21=100*abitantixkmq1921/pop21
gen density11= 100*(abitantixkmq1911/pop11)
gen Ddens=density21-density11


gen poss11=100*poss11vol6tabxc/pop11
gen poss21=100*poss21pag260relazionegenerale/pop21
gen Dposs=poss21-poss11

gen agr_own11=100*contadini11/pop11
gen agr_own21=100*contadini21/pop21

gen agr_not11=100*(totagr11-contadini11)/pop11
gen agr_not21=100*(totagr21-contadini21)/pop21

gen Dagr_own=agr_own21-agr_own11
gen Dagr_not=agr_not21-agr_not11


gen ill21=100-alfabeti21
gen ill11=100-alfabeti11

gen Dill=100*(ill21 - ill11)




// Table A8


reg  Destrema19_09 Denf_19_09 Dop Ddens Dposs Dagr_own Dagr_not Dill  op11p density11 poss11 agr_own11 agr_not11, robust

xi:reg  Destrema19_09 Denf_19_09 Dop Ddens Dposs Dagr_own Dagr_not Dill  op11p density11 poss11 agr_own11 agr_not11 i.area, robust

reg  Destrema19_09 Denf1 Denf2 Dop Ddens Dposs Dagr_own Dagr_not Dill  op11p density11 poss11 agr_own11 agr_not11, robust

xi:reg  Destrema19_09 Denf1 Denf2 Dop Ddens Dposs Dagr_own Dagr_not Dill  op11p density11 poss11 agr_own11 agr_not11 i.area, robust

reg  DestremaMP19_09 Denf_19_09 Dop Ddens Dposs Dagr_own Dagr_not Dill  op11p density11 poss11 agr_own11 agr_not11, robust

xi:reg  DestremaMP19_09 Denf_19_09 Dop Ddens Dposs Dagr_own Dagr_not Dill  op11p density11 poss11 agr_own11 agr_not11 i.area, robust

reg  DestremaMP19_09 Denf1 Denf2 Dop Ddens Dposs Dagr_own Dagr_not Dill  op11p density11 poss11 agr_own11 agr_not11, robust

xi:reg  DestremaMP19_09 Denf1 Denf2 Dop Ddens Dposs Dagr_own Dagr_not Dill  op11p density11 poss11 agr_own11 agr_not11 i.area, robust
